<?php namespace App\Infra;

use App\Utils\ModelOperatorTrait;
use App\Models\Hotel;
class HotelManager{
	use ModelOperatorTrait;

	public function getHotels($conditions = null,$first = false,$union = []){
		return $this->findModel(Hotel::class,Hotel::query()->with($union),$conditions,$first);
	}

	public function updateHotel($conditions = null,$data = null){
		$this->update(Hotel::class,Hotel::query(),$conditions,$data);
	}

	public function createHotel($data){
		$this->create(Hotel::class,$data);
	}

	public function deleteHotel($conditions = null){
		$this->delete(Hotel::class,Hotel::query(),$conditions);
	}
}